public class Test {
    void func(int N){
        int count = 0;
        for(int i = 0;i < N;i++){
            for(int j = 0;j < N;j++){
                count++;
            }
        }
        for(int k = 0;k<2*N;k++ ){
            count++;
        }
        int M = 10;
        while((M--)>0){
            count++;
        }
    }
    void func2(int N){
        int count = 0;
        for(int k = 0;k <2*N;k++){
            count++;
        }
        int M = 10;
        while((M--)>0){
            count++;
        }
        System.out.println(count);
    }
    void func3(int N,int M){
        int count = 0;
        for(int K = 0; K<M;K++){
            count++;
        }
        for(int K = 0;K < N; K++){
            count++;
        }
        System.out.println(count);
    }
    void func4(int N){
        int count = 0;
        for(int K = 0;K < 100; K++ ){
            count++;
        }
        System.out.println(count);
    }
    public static void bubbbleSort(int[] array){
        for(int i = 0;i < array.length-1;i++){
            boolean flg = false;
            for(int j = 0;j < array.length-1-i;j++){
                if(array[j] >array[j+1]){
                    int tmp = array[j];
                    array[j] = array[j+1];
                    array[j+1] = tmp;
                    flg = true;
                }
            }
            if(flg == false){
                return;
            }
        }
    }
    int binarySearch(int[] array, int value){
        int begin = 0;
        int end = array.length-1;
        while(begin <= end ){
            int mid = begin+((end-begin)/2);
            if(array[mid]<value)
                begin = mid+1;
            else if(array[mid]>value)
                end = mid-1;
            else
                return mid;
        }
        return -1;
    }
    long factorial(int N){
        return N < 2?N:factorial(N-1)*N;
    }
    int fibonacci1(int N){
        return N < 2?N:fibonacci1(N-1)+fibonacci1(N-2);
    }
    long[] fibonacci(int n){
        long[] fibArray = new long[n+1];
        fibArray[0] = 0;
        fibArray[1] = 1;
        for(int i = 2;i <= n;i++){
            fibArray[i] = fibArray[i-1]+fibArray[i-2];
        }
        return fibArray;
    }

}
